<form action='getForm.php' method='POST'>
	<input type="text" name='array'/>
	<input type="submit" value="Gerar Form"/>
</form>

<div style="float: left;">
    <textarea style="width: 650px; height: 600px;">
<form>
                
 <!-- Atributos Comuns -->
	
	<input type="checkbox" id="ctrl_form_class" />
	<label for="ctrl_form_class">class</label>
	<input type="text" name="form_class" id="form_class"/><br/>
	
	<input type="checkbox" id="ctrl_form_id" />
	<label for="ctrl_form_id">id</label>
	<input type="text" name="form_id" id="form_id"/><br/>
	
	<input type="checkbox" id="ctrl_form_title" />
	<label for="ctrl_form_title">title</label>
	<input type="text" name="form_title" id="form_title"/><br/>
	
	<input type="checkbox" id="ctrl_form_xmlSpace" />
	<label for="ctrl_form_xmlSpace">xml:space</label>
	<select name="form_xmlSpace" id="form_xmlSpace">
		<option selected value="default">Manter</option>
		<option value="preserve">Retirar</option>
	</select><br/>
	
	<input type="checkbox" id="ctrl_form_xmlLang" />
	<label for="ctrl_form_xmlLang">xml:lang</label>
	<input type="text" name="form_xmlLang" id="form_xmlLang"/><br/>
	
	<input type="checkbox" id="ctrl_form_dir" />
	<label for="ctrl_form_dir">dir</label>
	<select name="form_dir" id="form_dir">
		<option selected value="ltr">Esquerda para direita</option>
		<option value="rtl">Direita para esquerda</option>
	</select><br/>
	
	<input type="checkbox" id="ctrl_form_style" />
	<label for="ctrl_form_style">style</label>
	<input type="text" name="form_style" id="form_style"/><br/>
	
<!-- Manipuladores de Eventos -->
	
	
	<input type="checkbox" id="ctrl_form_onclick" />
	<label for="ctrl_form_onclick">onclick</label>
	<input type="text" name="form_onclick" id="form_onclick"/><br/>
	
	<input type="checkbox" id="ctrl_form_ondblclick" />
	<label for="ctrl_form_ondblclick">ondblclick</label>
	<input type="text" name="form_ondblclick" id="form_ondblclick"/><br/>
	
	<input type="checkbox" id="ctrl_form_onmousedown" />
	<label for="ctrl_form_onmousedown">onmousedown</label>
	<input type="text" name="form_onmousedown" id="form_onmousedown"/><br/>
	
	<input type="checkbox" id="ctrl_form_onmouseup" />
	<label for="ctrl_form_onmouseup">onmouseup</label>
	<input type="text" name="form_onmouseup" id="form_onmouseup"/><br/>
	
	<input type="checkbox" id="ctrl_form_onmouseover" />
	<label for="ctrl_form_onmouseover">onmouseover</label>
	<input type="text" name="form_onmouseover" id="form_onmouseover"/><br/>
	
	<input type="checkbox" id="ctrl_form_onmousemove" />
	<label for="ctrl_form_onmousemove">onmousemove</label>
	<input type="text" name="form_onmousemove" id="form_onmousemove"/><br/>
	
	<input type="checkbox" id="ctrl_form_onmouseout" />
	<label for="ctrl_form_onmouseout">onmouseout</label>
	<input type="text" name="form_onmouseout" id="form_onmouseout"/><br/>
	
	<input type="checkbox" id="ctrl_form_onmousepress" />
	<label for="ctrl_form_onmousepress">onmousepress</label>
	<input type="text" name="form_onmousepress" id="form_onmousepress"/><br/>
	
	<input type="checkbox" id="ctrl_form_onkeydown" />
	<label for="ctrl_form_onkeydown">onkeydown</label>
	<input type="text" name="form_onkeydown" id="form_onkeydown"/><br/>
	
	<input type="checkbox" id="ctrl_form_onkeyup" />
	<label for="ctrl_form_onkeyup">onkeyup</label>
	<input type="text" name="form_onkeyup" id="form_onkeyup"/><br/>
	
	
<!-- Atributos Especificos -->

<?php
	if(isset($_POST['array'])){
	
		$elementos = explode(',',$_POST['array']);
                
//==============================================================================
//=============           ESCREVE DENTRO DA TEXTAREA            ================
//==============================================================================               


                
		foreach($elementos as $e){

			echo "	
			
	<input type='checkbox' id='ctrl_form_$e' />
	<label for='ctrl_form_$e'>$e</label>
	<input type='text' name='form_$e' id='form_$e'/><br/>";

		}
?>
		

</form>
</textarea><br/><br/>
</div>
                
                
<div style="float: right;">
                
<form>
    
    <?php
		foreach($elementos as $e){

			echo "	
			
	<input type='checkbox' id='ctrl_form_$e' />
	<label for='ctrl_form_$e'>$e</label>
	<input type='text' name='form_$e' id='form_$e'/><br/><br/>";

		}?>
		

</form>
                
</div>
                
                
<textarea style="width: 650px; height: 200px;">

<?php

		foreach($elementos as $e){
			echo "\${$e} = \$_POST['form_{$e}'];\n";
                }
?>

</textarea>
    <?php
    
    ?>